import ajax from "./ajax";

// 录入信息的公司工商信息
export function newCustomer(customer) {
  let url = `/api/enterprise/info`;
  return ajax.post(url, customer);
}

// 获取公司工商信息
export function getByTaxId(taxId) {
  let url = `/api/enterprise/info/${taxId}`;
  return ajax.get(url);
}

// 删除公司工商信息
export function deleteByTaxId(taxId) {
  let url = `/api/enterprise/info/${taxId}`;
  return ajax.delete(url);
}

//  分页获取公司工商信息
export function getCustomerList(searchObj) {
  let url = `/api/enterprise/infos`;
  let p = Object.assign({}, searchObj);
  delete p.total;
  p.status = 1;
  return ajax.get(url, { params: p });
}
